import request from '@/utils/request'

// 查询出资人缴款列表
export function listFundLpPayment(query) {
  return request({
    url: '/lpPayment/fundLpPayment/list',
    method: 'get',
    params: query
  })
}

// 查询出资人缴款合计
export function getFundLpPaymentSum(query) {
  return request({
    url: '/lpPayment/fundLpPayment/getSum',
    method: 'get',
    params: query
  })
}

// 查询出资人缴款详细
export function getFundLpPayment(id) {
  return request({
    url: '/lpPayment/fundLpPayment/' + id,
    method: 'get'
  })
}

// 保存出资人缴款
export function saveFundLpPayment(data) {
  return request({
    url: '/lpPayment/fundLpPayment/save',
    method: 'post',
    data: data
  })
}

// 批量保存出资人缴款
export function saveListFundLpPayment(data) {
  return request({
    url: '/lpPayment/fundLpPayment/saveList',
    method: 'post',
    data: data
  })
}

// 删除出资人缴款
export function delFundLpPayment(id) {
  return request({
    url: '/lpPayment/fundLpPayment/' + id,
    method: 'delete'
  })
}

// 导出出资人缴款
export function exportFundLpPayment(query) {
  return request({
    url: '/lpPayment/fundLpPayment/export',
    method: 'get',
    params: query
  })
}

//
export function calculationPaymentAmount(fundId, investId, callPeriod) {
  return request({
    url: '/lpPayment/fundLpPayment/calculationPaymentAmount/' + fundId + '/' + investId + '/' + callPeriod,
    method: 'get'
  })
}
// 删除出资人缴款
export function delFundInvestorLpa(id) {
  return request({
    url: '/lpa/fundInvestorLpa/' + id,
    method: 'delete'
  })
}
